package com.ml.model;

import javax.persistence.*;
import java.io.Serializable;

@Entity
@Table(name = "ml_hrmschedulesign", schema = "")
public class KqData implements Serializable {

    private Integer id;

    private Integer userId;

    /**用户名字 */
    private String userName;

    /**考勤所属分部*/
    private Integer locationid;


    /**用户类型：1:内部用户，2：外部用户*/
    private Integer userType;
    /**考勤类型：1：签到，2：签退*/
    private Integer signType;
    /**考勤日期：签到或签退日期*/
    private String signDate;
    /**考勤时间：签到或签退时间*/
    private String signTime;
    /**客户端ip*/
    private String clientAddress;
    /**是否公司内考勤：1:是，0:否*/
    private Integer isInCom;
    /** 打卡 来源，字符串， 这里 默认为 空 e9mobile e9pc */
    private String signFrom;
    /**手机打卡的 经度 */
    private String longitude;
    /**手机打卡的 纬度 */
    private String latitude;
    /**打卡地址 */
    private String addr;

    /** 时区 默认 GMT+8 */
    private String timezone;
    /**打卡归属时间 默认和 signDate 一样*/
    private String belongdate;



    /*************** 其他 字段如需 需要 后期自行添加  hrmschedulesign  ****************/

    //默认构造参数
    public KqData(){

    }

    /**
     * @param userName 用户名字
     * @param signType 签到1 签退2
     * @param signDate 日期
     * @param signTime 时间
     */
    public KqData(String userName, Integer signType, String signDate, String signTime){
        this.userName = userName;//姓名
        this.userType = 1;//内部用户，默认
        this.isInCom = 1;//公司内考勤
        this.signFrom = "";//数据来源备注，这里自己定义为
        this.signType = signType;
        this.signDate = signDate;
        this.signTime = signTime;
        this.timezone = "GMT+8";
        this.belongdate = signDate;
    }


    /**
     * @param userName 用户名字
     * @param signDate 日期
     * @param signTime 时间
     */
    public KqData(String userName, String signDate, String signTime){
        this.userName = userName;//姓名
        this.userType = 1;//内部用户，默认
        this.isInCom = 1;//公司内考勤
        this.signFrom = "";//数据来源备注，这里自己定义为
        this.signDate = signDate;
        this.signTime = signTime;
        this.timezone = "GMT+8";
        this.belongdate = signDate;
    }

    @Id
    @GeneratedValue(strategy= GenerationType.AUTO)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Column(name = "userid")
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Column(name = "usertype")
    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    @Column(name = "signtype")
    public Integer getSignType() {
        return signType;
    }

    public void setSignType(Integer signType) {
        this.signType = signType;
    }

    @Column(name = "signdate")
    public String getSignDate() {
        return signDate;
    }

    public void setSignDate(String signDate) {
        this.signDate = signDate;
    }

    @Column(name = "signtime")
    public String getSignTime() {
        return signTime;
    }

    public void setSignTime(String signTime) {
        this.signTime = signTime;
    }

    @Column(name = "clientaddress")
    public String getClientAddress() {
        return clientAddress;
    }

    public void setClientAddress(String clientAddress) {
        this.clientAddress = clientAddress;
    }

    @Column(name = "isincom")
    public Integer getIsInCom() {
        return isInCom;
    }

    public void setIsInCom(Integer isInCom) {
        this.isInCom = isInCom;
    }

    @Column(name = "signfrom")
    public String getSignFrom() {
        return signFrom;
    }

    public void setSignFrom(String signFrom) {
        this.signFrom = signFrom;
    }

    @Column(name = "longitude")
    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    @Column(name = "latitude")
    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    @Column(name = "addr")
    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    @Column(name = "timezone")
    public String getTimezone() {
        return timezone;
    }

    public void setTimezone(String timezone) {
        this.timezone = timezone;
    }

    @Column(name = "belongdate")
    public String getBelongdate() {
        return belongdate;
    }

    public void setBelongdate(String belongdate) {
        this.belongdate = belongdate;
    }

    /**临时用户名字段*/
    //@Transient
    @Column(name = "userName")
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Column(name = "locationid")
    public Integer getLocationid() {
        return locationid;
    }

    public void setLocationid(Integer locationid) {
        this.locationid = locationid;
    }
}
